package com.river.boot.biz.converter;

import com.river.boot.biz.model.entity.ProductSpec;
import com.river.boot.biz.model.form.ProductSpecForm;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * 菜品规格对象转换器
 *
 * @author JiangCheng Xiang
 * @since 2025-04-25 15:49
 */
@Mapper(componentModel = "spring")
public interface ProductSpecConverter {

    ProductSpecForm toForm(ProductSpec entity);

    ProductSpec toEntity(ProductSpecForm formData);

    List<ProductSpec> toEntityList(List<ProductSpecForm> specifications);

    List<ProductSpecForm> toFormList(List<ProductSpec> productSpecs);
}